
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    // 定义状态
    state: {
        baseUrl: 'http://zadai.net:8001',
        navTabstatu:0
    },
    mutations:{
        setId(state,id) {
            state.navTabstatu = id
        },
        CHANGEZERO(state){
            state.navTabstatu = 0;
        },
        CHANGEONE(state){
            state.navTabstatu = 1;
        }
    },
    actions: {
        changezero(context) {
            context.commit("CHANGEZERO");
        },
        changeone(context) {
            context.commit("CHANGEONE");
        }
    }
})
